package com.oms.app.user.service.impl;

import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import com.oms.app.sequence.service.impl.SequenceManager;
import com.oms.app.user.dao.IModuleDAO;
import com.oms.app.user.model.Module;
import com.oms.app.user.service.IModuleService;
import com.oms.core.service.impl.GeneralService;

/**
 * controller
 * @author wtj
 * @date Sep 10, 2012  10:25:25 PM
 */

public class ModuleServiceImpl extends GeneralService<Object, String> implements IModuleService {

	@Override
	public int delete(String primaryKey) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public Object get(String primaryKey) {
		// TODO Auto-generated method stub
		return null;
	}
	@Override
	public List getModuleList(HttpServletRequest request) {
		return ((IModuleDAO) dao).getModuleList(request);
	}

	@Override
	public boolean saveOrUpdateModule(Module moduleForm) {
		moduleForm.setId(SequenceManager.nextID("tmodule"));
		return ((IModuleDAO) dao).saveOrUpdateModule(moduleForm);
	}

	@Override
	public boolean deleteModule(String PK) {
		return ((IModuleDAO) dao).deleteModule(PK);
	}

	@Override
	public List getRoleOfModule(Map map) {
		return ((IModuleDAO) dao).getRoleOfModule(map);
	}

	@Override
	public boolean modifyStatus(Map map) {
		return ((IModuleDAO) dao).modifyStatus(map);
	}
	
}